/**
  * @name 格式化日期
  * @description: 
  * @param date {Date} required 日期
  * @param sign {String} 符号
  * @return 
  */

export const formDate = (time,sign="-")=>{
	let year = time.getFullYear()
	let month = time.getMonth()+1
	let date = time.getDate()
	
	function toFixed(num){
		let len = num.toString().length
		return len < 2 ? "0" + num : num
	}
	
	return `${year}${sign}${toFixed(month)}${sign}${toFixed(date)}`
}
